The Phong illumination model combines three core components—ambient, diffuse, and specular reflection—to create a realistic lighting effect on surfaces.
Think of the Phong model as layering different "types" of light on top of each other to approximate how light behaves in the real world. Ambient light fills in the shadows with a base layer of light. Diffuse reflection makes surfaces visible from any angle, as it spreads light evenly. Finally, specular reflection adds shiny highlights where light reflects at sharper angles toward the viewer.
a base level of light that fills the scene uniformly, ensuring that no part of the object is entirely in shadow. Imagine it as the "room light" that keeps everything visible even if there’s no direct light source shining on it.
spreading light evenly across the surface. It’s what lets us see the object’s color and shape regardless of the viewing angle. The amount of light depends on the angle between the light source and the surface—direct light (perpendicular) appears brightest.
You can think of specular reflection as the "shine" or "glare" you see on a polished surface. It’s strongest when the light bounces directly toward you. The
Shading determines how the illumination model is applied across the surface.
In flat shading, think of each polygon as a "tile" that reflects light uniformly. This results in sharp, visible edges between polygons, making it best for large, flat surfaces.
calculating colors at the "corner points" (vertices) and then blending them across the polygon’s face. It’s a more efficient method than Phong shading but can miss certain highlights.
Phong shading focuses on pixel-by-pixel lighting to achieve a smooth, detailed finish. It captures subtle variations in lighting, giving realistic highlights and shadows at a high computational cost.
Example (Emerald Material):
adjusting how "sharp" the highlights are. Small values (like 1) create large, soft highlights (plastic or matte surfaces), while high values (100 or more) give small, sharp highlights (like polished metal).
Light intensity naturally decreases with distance. Phong includes an attenuation factor using constants
Think of attenuation as the fading of light over distance. Imagine standing far from a light source—the further you go, the dimmer the light appears.
a "point light" that spreads evenly outward. Spotlights are a version of this with a focused direction.